<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%> 
<%@ page import="java.text.*"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div class="box box-solid">
    <div class="box-header">
        <i class="fa fa-text-width"></i>
        <h3 class="box-title">消费明细</h3>
    </div><!-- /.box-header -->
    <div class="box-body">
        <dl class="dl-horizontal">
            <dt>会员姓名</dt>
            <dd>${sale.isCustomer == 1 ? sale.customerName: "非会员消费"} </dd>
            
            <dt>支付类型</dt>
            <dd><c:choose>  
                <c:when test="${sale.payment.way eq 'CASH'}"> 现金</c:when>  
                <c:when test="${sale.payment.way eq 'ALIPAY'}"> 支付宝</c:when>  
                <c:when test="${sale.payment.way eq 'BANK'}"> 银联</c:when>  
                <c:when test="${sale.payment.way eq 'BANLANCE'}"> 会员预存</c:when>  

               <c:otherwise>  未知  </c:otherwise>  
            </c:choose>  </dd>
            
            <dt>明细</dt>
            <dd>
               <c:forEach var="detail" items="${sale.details}"> 
                      <strong>${detail.productName}<span class="badge">$ ${detail.money}</span></strong>       

               </c:forEach>
               
                
            </dd>
            
            <dt>合计</dt>
            <dd>${sale.saleMoney}</dd>
            
        </dl>
    </div>
</div>